
#include "fxcc/imgui/Editor.h"
#include "fxcc/core/graph/common/ImageMipmap.h"

using namespace fxcc::graph::common;

template <>
bool fxcc::imgui::Editor::Edit<ImageMipmap::MipMapData>(const std::string& label, ImageMipmap::MipMapData& e)
{
    EditInst<int >("m_Width", e.m_Width);
    EditInst<int >("m_Height", e.m_Height);
    EditInst<int >("m_NrComponent", e.m_NrComponent);
    CheckBoxInst<int >("m_Hdr", e.m_HDR);
    ImGui::Text("%p", e.m_Data);
    return false;
}

template <>
bool fxcc::imgui::Editor::Edit<ImageMipmap::Desc>(const std::string& label, ImageMipmap::Desc& e)
{

    EditInst<std::string>("wic Path", e.m_wicPath);
    CheckBoxInst<int>("wic Hdr", e.m_wicHdr);
    InputInst<int>("Wic req", e.m_wicReq);

    return false;
}
template <>
bool fxcc::imgui::Editor::Edit<ImageMipmap>(const std::string& label, ImageMipmap& e)
{
    int index = 0;

    EditInst<ImageMipmap::Desc>("desc", e.m_Desc);

    if (ImGui::Button("Load"))
    {
        e.Init();
    }
    EditInst<ImageMipmap::MipMapData>("wicTexture", e.m_WICTexture);

    return false;
}